<%@ page contentType="application/xhtml+xml;charset=utf-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld"%>

<table border="2">
    <thead>
        <tr>
            <th>Summary</th>
            <th>Start Time</th>
            <th>End Time</th>
            <th>Recurrence</th>
            <th>Description</th>
            <th>Location</th>
            <th>Edit</th>
            <th>Remove</th>
        </tr>
    </thead>
    <tbody>
        <c:forEach items="${eventList}" var="event" >
            <tr>
                <td><c:out value="${event.summary}"/></td>
                <td><c:out value="${event.startDateTime}"/></td>
                <td><c:out value="${event.endDateTime}"/></td>
                <td><c:out value="${event.recurrency}"/></td>
                <td><c:out value="${event.description}"/></td>
                <td><c:out value="${event.location}"/></td>
                <td>
                    <stripes:form beanclass="cz.muni.fi.xvano1.trinity.beans.EditEventActionBean">
                        <stripes:hidden name="uid" value="${event.uid}"/>
                        <stripes:submit name ="editEventInput" value="Edit"/>
                    </stripes:form>
                </td>
                <td>
                    <stripes:form beanclass="cz.muni.fi.xvano1.trinity.beans.RemoveEventActionBean">
                        <stripes:hidden name="uid" value="${event.uid}"/>
                        <stripes:submit name ="removeEventInputConfirm" value="Remove"/>
                    </stripes:form>
                </td>
            </tr>
        </c:forEach>
    </tbody>
</table>
